package com.csist.service.bo.impl;

import com.csist.mapper.bo.BasicStudentInfoBoMapper;
import com.csist.pojo.bo.BasicStudentInfoBo;
import com.csist.pojo.dto.BasicStudentInfoBoDTO;
import com.csist.service.bo.BasicStudentInfoBoService;
import com.csist.util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.Collections;
import java.util.List;

/**
 * @ClassName BasicStudentInfoBoServiceImpl
 * @Description 【自行描述】
 * @Author cn
 * @Date 2024/6/26 17:38
 * @Version 1.0
 */
public class BasicStudentInfoBoServiceImpl implements BasicStudentInfoBoService {

    private SqlSession sqlSession;
    private BasicStudentInfoBoMapper basicStudentInfoBoMapper;

    public BasicStudentInfoBoServiceImpl() {
        sqlSession = SqlSessionUtil.openSession();
        basicStudentInfoBoMapper = sqlSession.getMapper(BasicStudentInfoBoMapper.class);
    }

    @Override
    public List<BasicStudentInfoBo> selectAllBasicStudentInfo() {
        List<BasicStudentInfoBo> list = basicStudentInfoBoMapper.selectAllBasicStudentInfo();
        if (list != null && list.size() > 0) {
            return list;
        }
        return null;
    }

    @Override
    public BasicStudentInfoBo getBasicStudentInfoById(int id) {
        return null;
    }

    @Override
    public List<BasicStudentInfoBo> trendsFindManyBasicStudentInfo(BasicStudentInfoBoDTO bsibDTO) {
        List<BasicStudentInfoBo> list = basicStudentInfoBoMapper.trendsFindManyBasicStudentInfo(bsibDTO);
        if (list != null && list.size() > 0) {
            return list;
        }
        return null;
    }
}
